/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author lzw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';
import { UploadApiResult } from '../sys/upload';
import { UploadFileParams } from '/#/axios';

const { ctxPath, adminPath } = useGlobSetting();

export interface FtdsExamine extends BasicModel<FtdsExamine> {
  examineSf?: string; // 省份
  examineCjsj?: string; // 创建时间
  examineFyid?: string; // 法院id
  examineFymc?: string; // 法院名称
  examineAjms?: string; // 案件描述
  examineAjmc?: string; // 案件名称
  examineAjje?: string; // 案件金额
  examineSfz?: string; // 身份证
  examineSjhm?: string; // 手机号码
  examineAjzt?: string; // 案件状态
  examineShyj?: string; // 审核意见
  examineSszh?: string; // 所属账号
}

export const ftdsExamineList = (params?: FtdsExamine | any) =>
  defHttp.get<FtdsExamine>({ url: adminPath + '/operating/ftdsExamine/list', params });

export const ftdsExamineListData = (params?: FtdsExamine | any) =>
  defHttp.post<Page<FtdsExamine>>({ url: adminPath + '/operating/ftdsExamine/listData', params });

export const ftdsExamineForm = (params?: FtdsExamine | any) =>
  defHttp.get<FtdsExamine>({ url: adminPath + '/operating/ftdsExamine/form', params });

export const ftdsExamineSave = (params?: any, data?: FtdsExamine | any) =>
  defHttp.postJson<FtdsExamine>({ url: adminPath + '/operating/ftdsExamine/save', params, data });

export const ftdsExamineImportData = (
  params: UploadFileParams,
  onUploadProgress: (progressEvent: ProgressEvent) => void,
) =>
  defHttp.uploadFile<UploadApiResult>(
    {
      url: ctxPath + adminPath + '/operating/ftdsExamine/importData',
      onUploadProgress,
    },
    params,
  );

export const ftdsExamineDisable = (params?: FtdsExamine | any) =>
  defHttp.get<FtdsExamine>({ url: adminPath + '/operating/ftdsExamine/disable', params });

export const ftdsExamineEnable = (params?: FtdsExamine | any) =>
  defHttp.get<FtdsExamine>({ url: adminPath + '/operating/ftdsExamine/enable', params });

export const ftdsExamineDelete = (params?: FtdsExamine | any) =>
  defHttp.get<FtdsExamine>({ url: adminPath + '/operating/ftdsExamine/delete', params });
